1. Field of the Invention
The present invention relates to a printing apparatus configured to execute processing of detecting dirt and dust on a member of the printing apparatus (e.g., a document glass, a document glass surface, a document guide plate, etc.), a method for controlling the printing apparatus, and a storage medium.
2. Description of the Related Art
Conventionally, there has been known a technique for reading an image on a surface of a conveyance belt or an image on a surface of a rotating conveyance roller a predetermined number of times to detect dirt and dust on a document glass disposed between an exposure system and a document to be conveyed. In the technique, the processing of detecting dirt and dust on the document glass is executed when a power source is turned on, when the reading of all documents placed on a document tray is completed, or between the reading of a plurality of documents. Then, in a case where it is determined that dirt or dust is detected on the document glass, a filter constant to be applied to image data of a read document is changed to make an abnormal pixel caused by the dirt or dust on the document glass unnoticeable (refer to Japanese Patent Application Laid-Open No. 2004-104587).
However, the case where the processing of detecting dirt and dust on the document glass is executed takes longer time than a case where no detection processing is executed. Meanwhile, depending on a sheet to be used in printing, in some cases, a user desires to perform printing without an effect of an abnormal pixel after execution of the processing of detecting dirt and dust on the document glass, and in other cases, the user desires prompt execution of the reading of a document without execution of the processing of detecting dirt and dust on the document glass.